package org.springblade.modules.admin.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/5/10 16:45
 */
@Getter
@AllArgsConstructor
public enum MaintainPlanContentEnum {

	/**
	 * 对应数据库表里面的type_status字段
	 */
	MAINTAIN_ZC(0, "正常"),
	MAINTAIN_BY(1, "保养"),
	MAINTAIN_WX(2, "维修"),
	MAINTAIN_KR(3, "救援"),
	MAINTAIN_PARTS(4, "配件"),
	MAINTAIN_AFFAIR(5, "事务"),
	MAINTAIN_CHECK(6, "质检"),
	SCORE_BY(7, "评分"),
	ANNUAL_REVIEW(8, "年审"),
	ABARBEITUNG(9, "整改");
	final int id;
	final String name;
	public static String getName(int id){
		MaintainPlanContentEnum[] enums = MaintainPlanContentEnum.values();
		for (MaintainPlanContentEnum typeEnum : enums) {
			if(typeEnum.getId() == id){
				return typeEnum.getName();
			}
		}
		return null;
	}

}
